package cn.yqn.order.service.impl;

import cn.yqn.basic.utils.PageList;
import cn.yqn.order.domain.OrderPetAcquisition;
import cn.yqn.order.mapper.OrderPetAcquisitionMapper;
import cn.yqn.order.query.OrderPetAcquisitionQuery;
import cn.yqn.order.service.IOrderPetAcquisitionService;
import cn.yqn.org.domain.Employee;
import cn.yqn.org.domain.Shop;
import cn.yqn.org.mapper.EmployeeMapper;
import cn.yqn.org.mapper.ShopMapper;
import cn.yqn.pet.mapper.PetMapper;
import cn.yqn.pet.mapper.SearchMasterMsgMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderPetAcquisitionServiceImpl implements IOrderPetAcquisitionService {

    @Autowired
    private OrderPetAcquisitionMapper orderPetAcquisitionMapper;

    @Autowired
    private SearchMasterMsgMapper searchMasterMsgMapper;

    @Autowired
    private EmployeeMapper employeeMapper;

    @Autowired
    private ShopMapper shopMapper;

    @Autowired
    private PetMapper petMapper;

    @Override
    public PageList<OrderPetAcquisition> queryPage(OrderPetAcquisitionQuery query, Long id) {
        Employee employee = employeeMapper.loadByLogininfoId(id);
        if (employee.getShop_id() != null) {
            Shop shop = shopMapper.loadById(employee.getShop_id());
            if (shop.getAdmin_id() != employee.getShop_id()) {

            }
        }
        return null;
    }
}
